package com.eapi.project.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户接口评论表
 * @TableName comment
 */
@TableName(value ="comment")
@Data
public class Comment implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 评论调用用户id
     */
    private Long userId;

    /**
     * 评论用户名称
     */
    private String userName;

    /**
     * 被评论接口id
     */
    private Long interfaceInfoId;

    /**
     * 被评论接口名称
     */
    private String interfaceInfoName;

    /**
     * 评论内容
     */
    private String context;

    /**
     * 点赞数
     */
    private Long likes;

    /**
     * 创建时间
     */
    private Date createtime;

    /**
     * 更新时间
     */
    private Date updatetime;

    /**
     * 是否删除(0-未删, 1-已删)
     */
    @TableLogic
    private Integer isdelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userid=").append(userId);
        sb.append(", username=").append(userName);
        sb.append(", interfaceinfoid=").append(interfaceInfoId);
        sb.append(", interfaceinfoname=").append(interfaceInfoName);
        sb.append(", context=").append(context);
        sb.append(", likes=").append(likes);
        sb.append(", createtime=").append(createtime);
        sb.append(", updatetime=").append(updatetime);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}